module.exports = {
    devServer: {
        open: true,
        overlay: {
          warnings: false,
          errors: true
        },
        proxy: {
          // 日常mock开这个
          // change xxx-api/login => mock/login
          // detail: https://cli.vuejs.org/config/#devserver-proxy
          // [process.env.VUE_APP_API_URL]: {
          //   target: `http://127.0.0.1:${port}/mock`,
          //   changeOrigin: true,
          //   pathRewrite: {
          //     ['^' + process.env.VUE_APP_API_URL]: ''
          //   }
          // }
    
          // 和远程主机连开这个
          [process.env.VUE_APP_API_URL]: {
            target: 'http://121.199.23.187:8080',
            ws: true,
            changeOrigin: true,
            pathRewrite: {
              ['^' + process.env.VUE_APP_API_URL]: ''
            }
          }
        },
      },
      publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
      outputDir: 'web',
}